package com.example.demo.captcha;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Data
@Configuration
@ConfigurationProperties(prefix = "captcha")
public class Captcha {
    private Integer width;
    private Integer height;
    private Session session;

    @Data
    public static class Session{//要使用公开的 静态内部类,
        // 否则session拿不到值(要先有外部类的对象,然后才能拿到内部类,静态内部类就不用), 或者不要写内部类
        private String date;
        private String key;
    }
}
